Reference: startProc

The startProc procedure of a filter is called right before processing begins.  Its job is to perform one-time initializations before video frames are processed.

Prototype

int startProc(FilterActivation *fa, const FilterFunctions *ff);

Parameters:
    fa        Pointer to filter activation structure
    ff        Pointer to callback function structure

Return value:
    0 if successful, non-zero on unknown failure.

Exceptions:
    Except* functions may be called within startProc().

Requirements:
    Function may be omitted.  No default action is taken.

Remarks

This function is the ideal place for memory allocation and table initialization to take place.  Filter chain startup is comparatively rare, so this is the ideal place to put lengthy precomputation.

If you allocate a number of resources in this function, and one of the allocations fails, you do not have to release the resources that were allocated successfully.  VirtualDub always calls endProc for all filters on failure, so you can free the resources there.

[up] back to main page


VirtualDub external filter SDK 1.05©1999-2001 Avery Lee <phaeron@virtualdub.org>